package com.aspose.cells.a.d;

public abstract class zff {
   public com.aspose.cells.b.a.d.zm a;
   public byte[] b = new byte[8];
   private int c = 0;

   public void a(com.aspose.cells.b.a.d.zm var1) throws Exception {
      this.a = var1;
      boolean var2 = false;
      int var5 = this.a.a(this.b, 0, this.b.length);
      if (var5 >= 8) {
         if (this.b[0] == -119 && this.b[1] == 80 && this.b[2] == 78 && this.b[3] == 71 && this.b[4] == 13 && this.b[5] == 10 && this.b[6] == 26 && this.b[7] == 10) {
            this.c += 8;

            boolean var4;
            do {
               var5 = this.a.a(this.b, 0, this.b.length);
               if (var5 <= 0) {
                  return;
               }

               if (var5 < 8) {
                  return;
               }

               int var3 = 8 + this.b() + 4;
               var4 = this.a();
               this.c += var3;
            } while(var4);

         }
      }
   }

   protected abstract boolean a() throws Exception;

   protected int b() {
      int var1 = 0;

      for(int var2 = 0; var2 < 4; ++var2) {
         var1 += (this.b[var2] & 255 & 255) << 24 - var2 * 8;
      }

      return var1;
   }

   protected void c() throws Exception {
      int var1 = this.b() + 4;
      this.a((long)var1);
   }

   protected void a(long var1) throws Exception {
      while(var1 > 0L) {
         long var3 = this.a.a(var1, 1);
         if (var3 <= 0L) {
            return;
         }

         var1 -= var3;
      }

   }
}
